﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="RequisicaoDetalhe.aspx.cs" Inherits="welwitschia.Requisicoes.RequisicaoDetalhe" %>

<%@ Register Assembly="SandTrap.WebControls" Namespace="SandTrap.WebControls" TagPrefix="st" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <script type="text/javascript" language="javascript">
        $(function () {
            $("#tabs").tabs();
        });

    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="formulario">
        <div id="Div1" class="info">
            <h2>Encomenda de Refeições (Diária)</h2>
        </div>
        
        <ul class="formularioConteudo">
            <li>
                <label class="desc" id="lblDataRequisicao">
                    Data Serviço: </label>
                <div>    
                    <asp:TextBox ID="txtDataRequisicao" CssClass="required text ln" enabled="false" runat="server"></asp:TextBox>
                </div>
            </li>
            <li>
                <label class="desc" id="lblCliente">
                    Cliente
                </label>
                <span>
                    <asp:TextBox ID="txtCliente" CssClass="field text ln" Enabled="false" MaxLength="255"
                        size="40" runat="server"></asp:TextBox>
                    <label for="Field4">
                        Nome</label>
                </span><span>
                    <asp:TextBox ID="txtCodCliente" CssClass="field text fn" Enabled="false" size="4"
                        runat="server"></asp:TextBox>
                    <label for="Field3">
                        Código</label>
                </span>
            </li>
            <li>
                <label class="desc" id="lblUnidade">
                    Unidade </label>
                <div>  
                    <asp:HiddenField ID="hfIdUnidade" runat="server" />
                    <asp:TextBox ID="txtUnidade" class="required field text ln" Enabled="false" runat="server" />
                </div>
            </li>
            <li>
                <label class="desc" id="Label1">
                    Responsáveis
                </label>
                <span>
                    <asp:TextBox ID="txtGerente" CssClass="required field text ln" MaxLength="255" size="40" runat="server"></asp:TextBox>
                    <label for="Field4">
                        Gerente</label>
                </span>
                <span>
                    
                    <asp:TextBox ID="txtResponsavelRecepcaoProdutos" CssClass="required field text ln" MaxLength="255" size="40" runat="server"></asp:TextBox>
                    <label for="Field4">
                        Transporte</label>
                </span>
            </li>
            <li>
                <label class="desc" id="Label4">
                    Totais Previstos
                </label>
                <span>
                    <st:CurrencyBox ID="pbTotalVendasPrevistas" CssClass="field text ln" Enabled="false" runat="server" />
                    <label for="Field4">
                        Proveitos</label>
                </span>
                <span>
                    <st:CurrencyBox ID="pbTotalCustosPrevistos" CssClass="field text ln" Enabled="false" runat="server" />
                    <label for="Field4">
                        Custos</label>
                </span>
                <span>
                    <st:PercentBox ID="pbRacioTotalUnidade"  CssClass="field text ln" enabled="false" runat="server" />
                    <label for="Field4">
                        Rácio</label>
                </span>   
            </li>
        </ul>            
     </div>
     
     <div id="tabs">
        <ul>
            <li><a href="#tabs-1">Refeicoes</a></li>
        </ul>
        <div id="tabs-1">
            <asp:ListView runat="server" ID="lvRefeicoes" 
                OnItemDeleting="lvRefeicoes_ItemDeleting" OnItemEditing="lvRefeicoes_ItemEditing"
                OnItemCommand="lvRefeicoes_ItemCommand">
                <LayoutTemplate>
                      <table runat="server" class="grd" id="table1">
                        <thead>
                                <tr class="ghdr">
                                <td>
                                    <asp:Label ID="Label2" runat="server">Tipo</asp:Label>
                                </td>
                                <td>
                                    <asp:Label ID="Label3" runat="server">Classe</asp:Label>
                                </td>
                                <td>
                                    <asp:Label ID="Label8" runat="server">Rácio</asp:Label>
                                </td>
                                <td>
                                    <asp:Label ID="Label6" runat="server">Proveitos</asp:Label>
                                </td>
                                <td>
                                    <asp:Label ID="Label7" runat="server">Custos</asp:Label>
                                </td>
                                 <td>
                                    <asp:Label ID="Label9" runat="server">Estado</asp:Label>
                                </td>
                                <td>
                                    <asp:Label ID="Label5" runat="server">&nbsp;</asp:Label>
                                </td>
                            </tr>
                        </thead>
                        <tr runat="server" id="itemPlaceholder">
                        </tr>
                    </table>
                </LayoutTemplate>
                <ItemTemplate>
                    <tr id="Tr1" runat="server">
                        <td id="Td1" runat="server">
                            <%-- Data-bound content. --%>
                            <asp:Label ID="lblUnidade" runat="server" Text='<%#Eval("RefeicaoContratada.TipoRefeicao.Descricao") %>' />
                        </td>
                        <td id="Td2" runat="server">
                            <%-- Data-bound content. --%>
                            <asp:Label ID="lblTipoClass" runat="server" Text='<%#Eval("RefeicaoContratada.TipoClasseRefeicao.Descricao") %>' />
                        </td>
                        <td id="Td4" runat="server">
                            <%-- Data-bound content. --%>
                            <asp:Label ID="lvlblRacio" runat="server" Text='<%#Eval("RacioMateriasPrimasPrevisto") %>' />
                        </td>
                        <td id="Td5" runat="server">
                            <%-- Data-bound content. --%>
                            <asp:Label ID="lvlblTotalVendasPrevisto" runat="server" Text='<%#Eval("TotalVendasPrevisto") %>' />
                        </td>
                        <td id="Td6" runat="server">
                            <%-- Data-bound content. --%>
                            <asp:Label ID="lvlblCustos" runat="server" Text='<%#Eval("TotalCustosPrevisto") %>' />
                        </td>
                        <td id="Td7" runat="server">
                            <%-- Data-bound content. --%>
                            <asp:Label ID="lblEstado" runat="server" Text='<%#Eval("CodEstadoRefeicao") %>' />
                        </td>
                        <td id="Td3" runat="server">
                            <%-- Data-bound content. --%>
                            <asp:LinkButton ID="EditButton" CommandName="Edit" CommandArgument='<%# Eval("RefeicaoContratada.IdRefeicaoContratada")%>'
                                runat="server" Text="Encomendar Produtos"></asp:LinkButton>
                        </td>
                    </tr>
                </ItemTemplate>
            </asp:ListView>
        </div>
    </div>

    <div class="pageCommandArea" > 
        <asp:Button ID="btnEmitir" runat="server" Text="Emitir Requisição" OnClick="btnEmitir_Click" />
        <asp:Button ID="btnVoltar" runat="server" Text="Voltar" OnClick="btnVoltar_Click" />
    </div>
    
    <asp:HiddenField ID="hfNumeroRequisicao" runat="server" />
</asp:Content>
